export default class Handler {
  constructor(viewer) {
    this.viewer = viewer;
    this.handler = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas);
  }
  leftClick(fn) {
    this.handler.setInputAction((e) => {
      fn(e);
    }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
  }

  destroy() {
    this.handler && this.handler.destroy();
  }
}
